﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.Ycm20250401.Service._20250407
{
    /// <summary>
    /// 满减策略
    /// </summary>
    public class FullReductionStrategy: IPriceStrategy
    {
        public bool IsMatch(ActivityType type) => type == ActivityType.FullReduction;
        public decimal CalculatePrice(decimal original, Activity activity)
            => original >= activity.FullAmount ? original - activity.Reduction : original;
    }
}
